package com.beiding.config;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class FeignErrorAdvice {

    @ExceptionHandler(FeignErrorException.class)
    public ResponseEntity<String> fee(FeignErrorException e) //表单绑定异常
    {
        return ResponseEntity.status(e.getState()).body(e.getBody());
    }


}
